package components.editor
{
	import SEApp.dialogs.se_alert;
	import SEApp.se_util;
	
	import UIFree.ObjectEvent;
	import UIFree.command.uif_commandManager;
	import UIFree.components.uif_window;
	import UIFree.controls.uif_mainMenu;
	import UIFree.uif_bitmap;
	import UIFree.uif_component;
	
	import UIUtils.uif_tb;
	import UIUtils.uif_util;
	import UIUtils.uif_utilBitmap;
	
	import classes.c_events;
	import classes.c_imageTypes;
	import classes.c_layerAdjustDialogs;
	import classes.c_util;
	import classes.menu.c_collagesMenu;
	import classes.menu.c_defaultMenu;
	
	import components.brush.c_brushRelease;
	import components.scanario.c_assistantArea;
	
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.BlendMode;
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;
	import flash.display.IBitmapDrawable;
	import flash.display.Loader;
	import flash.display.PixelSnapping;
	import flash.display.Stage;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.external.ExternalInterface;
	import flash.filters.BitmapFilter;
	import flash.geom.Matrix;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	import flash.net.FileFilter;
	import flash.net.FileReference;
	import flash.utils.ByteArray;
	
	public class c_collagesEditor extends c_baseCollagesEditor {
		
		public function c_collagesEditor(parent: uif_component) {
			super(parent);
		}
		
		override protected function createComponents():void {
			super.createComponents();
			new c_brushRelease(cl);
			if (cl.flashVars.file)
				cl.openFileURL(imageLayer, cl.flashVars.file);
		}
		
		override protected function get mainMenu(): Array {
			return ExternalInterface.call('getCollagesMenu', c_collagesMenu.list()); 
		}
/*		
		protected function doPosition(e: Event): void {
			if (dragRect.link) initToolDialog('3DRotate', function(): c_propertyDialog {
				return new c_rotateDialog(cl.dialogLayer, dragRect.link, 'Вращение');
			});
		}
*/		
		
		
/*		
		protected function checkAndSelectElement(): void {
			var a_hitList: Array = getHitList();
			if (a_hitList.length > 0) {
				var index: int = a_hitList.length - 1;
				if ((a_hitList[index] == _dragRect.link) && (index > 0)) index--;
				a_hitList[index].executeMySelect();
			} else _dragRect.executeUnLink();
		}
		
		public function getHitList(shapeFlag: Boolean = true): Array {
			var a_hitList: Array = new Array();
			_imageLayer.forEach(function(element: c_baseElement): void {
				if (element.hitTestPoint(stage.mouseX, stage.mouseY, shapeFlag))
					a_hitList.push(element);
			}, c_baseElement);	
			return a_hitList;
		}
*/		
	}
}